﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Rule.aspx.cs" Inherits="OTA.Notification.Web.Rule.Rule" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <link href="../../Style/main.css" type="text/css" rel="stylesheet" />
    <script src="../../common/jquery-1.2.6.min.js"></script>
    
    <script>
        $(document).ready(function(){
        
            $(".chkneed input").click(function(){
            
                var id = $(this).attr('id');
                
                var s = parseInt(id.substr(13, 2)) - 2;
                
                if($(this).attr("checked")){
                    $(".chk" + s + " input").attr("disabled", "disabled");
                }
                else{
                    $(".chk" + s + " input").attr("disabled", "");
                    $(".chk" + s).attr("disabled", "");
                }
                
            });
        
		});
		
    </script>
    
     <link href="../Style/main.css" type="text/css" rel="stylesheet" /> 
     
</head>
<body>
    <form id="form1" runat="server">
    <div class="div_ct">
        <table width="100%" cellpadding="5">
            <tr>
                <td width="100">规则名称:
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" CssClass="text-area"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    消息类型:</td>
                    <td>
                        <asp:DropDownList ID="ddlMsgType" runat="server">
                        </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    规则列表:</td>
                    <td>
                        &nbsp;</td>
            </tr>
        </table>
    </div>
    <table width="100%">
    
    <tr>
    <td>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            onrowdeleting="GridView1_RowDeleting" 
            onrowdatabound="GridView1_RowDataBound" DataKeyNames="need,success,fail" 
            Width="100%">
        <Columns>
            <asp:TemplateField HeaderText="消息发送类型">
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" >
                    </asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="成功">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="失败">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox2" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="必须">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox3" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField HeaderText="操作" ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    </td></tr>
    
    <tr>
    <td>
        <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="添加规则" 
            CssClass="button" />
    </td></tr>
    
    <tr>
    <td>
        &nbsp;</td></tr>
    
    <tr>
    <td>
        <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="Save" CssClass="button" />
    </td></tr></table>
    </form>
</body>
</html>
